import axios from "axios";
import qs from "query-string";

export default {
  /**
   *  wps 服务检查
   * @method
   * @name wpsCheck
   */
  wpsCheck: (params = {}) => {
    let path = "http://localhost:32118/api/wps/check";
    let body = {};
    let queryParameters = {};
    let headers = {};
    let form = {};

    headers["Accept"] = "application/json";
    headers["Content-Type"] = "application/x-www-form-urlencoded";

    let url = path;
    let options = {
      method: "GET",
      url: url,
      params: queryParameters,
      data: body,
      headers: headers
    };
    if (Object.keys(form).length > 0) {
      options.data = qs.stringify(form);
      options.headers["Content-Type"] =
        "application/x-www-form-urlencoded;charset=utf-8";
    }
    return axios(options).then(ret => {
      return ret;
    });
  }
};
